/*
 * PredicatedLight.java
 * 
 * Created on Jun 9, 2007, 12:38:06 AM
 * 
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.infomancers.workflow.tests;

import com.infomancers.collections.Predicate;
import com.infomancers.workflow.Token;

/**
 *
 * @author aviadbd
 */
public class PredicatedLight implements Predicate<Token> {

    private int wanted;
    
    public PredicatedLight(int wanted) {
        this.wanted = wanted;
    }

    public boolean isTrue(Token item) {
        Light light = (Light) item.getData();
        return light.getWanted() == wanted;
    }
    
    

}
